package com.czumi.javawx;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import com.czumi.javawx.constants.WeixinConst;
import com.czumi.javawx.dao.entity.SysConfig;
import com.github.sd4324530.fastweixin.api.config.ApiConfig;


/**
 * 服务启动执行
 *
 */
@Component
public class StartupRunner implements CommandLineRunner {
	
	protected static Logger logger=LoggerFactory.getLogger(StartupRunner.class);  
	
	@Autowired
	protected SysConfig sysConfig;
	
	@Override
	public void run(String... args) throws Exception {
		
		WeixinConst.apiConfig = new ApiConfig(sysConfig.getAppid(), sysConfig.getSecret(), false);
		// TODO Auto-generated method stub
		logger.info(">>>>>>>>>>>>>>>服务启动执行，执行加载数据等操作<<<<<<<<<<<<<");
	}

}
